ActLayer Layers 

Declaration:

FUNCTION   ActLayer
:HANDLE ;

Description:

Function ActLayer returns a handle to the currently active layer in a document.

See Also:

ActiveClass   ActSymDef   GetLName  



  AssociateLayerWithStory Layers 

Declaration:

FUNCTION   AssociateLayerWithStory
(   layer :HANDLE;
    story :HANDLE
) :BOOLEAN ;

Description:

Associates a Layer with a Story. When a Layer is associated with a Story, the Layer's elevation is displayed relative to the Story elevation. If the elevation of the associated Story is changed, the elevation of the Layer changes with it.

Parameters:

layer The Layer to associate.
story The Story to associate.

Result:

Whether the Layer was successfully associated with the Story. This will fail if there is already another Layer associated with the Story that has the same Layer Level Type as the Layer passed in.

Example:

VAR

success:BOOLEAN;
story:HANDLE;
layer:HANDLE;

BEGIN

story := GetObject('4th Floor');
layer := GetObject('Plan 4');
success := AssociateLayerWithStory(layer, story);

See Also:

GetNumStories   GetStoryOfLayer   CreateStory  



  CopyMode Layers 

Declaration:

PROCEDURE   CopyMode
( mode:INTEGER ) ;

Description:

Procedure CopyMode sets the transfer mode for the active design layer. If a sheet layer is active, the procedure has no effect.

Transfer Modes

Transfer Mode Index Value
Copy 8
OR 9
XOR 10
BIC 11
Inverse Copy 12
Inverse OR 13
Inverse XOR 14
Inverse BIC 15


The design layer will only be imaged with the transfer mode on systems which support it, like Windows. Setting the transfer mode to a mode other than Copy (i.e. 8, Paint mode), when the current layer transparency percentage is 0, will also automatically change the layer transparency percentage to 50. Similarly, setting the transfer mode to Copy, when the current layer transparency percentage is greater than 0, will also automatically change the layer transparency percentage to 0. This is to approximately preserve the appearance of the layer on systems that don't support transfer modes, like Quartz on the Mac.

Parameters:

mode Mode index value.

See Also:

SetLayerTransparency  



  CreateLayer Layers 

Declaration:

FUNCTION   CreateLayer
(   layerName :STRING;
    layerType :INTEGER
) :HANDLE ;

Description:

Creates a layer of the specified type.

layerType values:
Design = 1
Presentation = 2



  CreateLayerLevelType Layers 

Declaration:

FUNCTION   CreateLayerLevelType
( name:STRING ) :BOOLEAN ;

Description:

Creates a Layer Level Type. A Layer can be assigned a Layer Level Type, which defines its location within a Story.

Parameters:

name The name of the Layer Level Type to create.

Result:

Whether a Layer Level Type was successfully created.

See Also:

GetNumLayerLevelTypes   GetLayerLevelType   SetLayerLevelType  



  CreateStory Layers 

Declaration:

FUNCTION   CreateStory
(   name :STRING;
    suffix :STRING
) :BOOLEAN ;

Description:

Creates a Story. Stories are used to group layers and are shown on the Story pane of the Organization dialog.

Parameters:

name The name of the Story to create.
suffix The suffix to be used at the end of the name of a Layer assoiciated with the Story.

Result:

Whether the Story was successfully created.

Example:

VAR

success:BOOLEAN

BEGIN

success := CreateStory('4th Floor', '4');

See Also:

GetNumStories   GetStoryOfLayer   AssociateLayerWithStory  



  CreateStoryLayerTemplate Layers 

Declaration:

FUNCTION   CreateStoryLayerTemplate
(   name :STRING;
    scaleFactor :REAL;
    layerLevelType :STRING;
    elevationOffset :REAL;
    defaultWallHeight :REAL;
  VAR  index :INTEGER
) :BOOLEAN ;

Description:

Creates a Story Layer Template in the current file. Sets the index parameter to the index of the new template in the list of templates. Story Layer Templates are used to define what Layers are typically found in a Story. When a Story is created, the user has the option to automatically create the Layers defined by the Story Layer Templates.

Parameters:

name The name of the Story Layer Template.
scaleFactor The scale to be assinged to any Layers created from this template.
layerLevelType The Layer Level Type to be assigned to any Layers created from this template.
elevationOffset The offset of the elevation of any Layer created from this template from the elevation of its Story.
defaultWallHeight The wall height to be assigned to any Layer created from this template.
index The index of the new template in the list of templates.

Result:

Whether a Story Layer Template is successfully created.

Example:

VAR

success:BOOLEAN;

BEGIN

success := CreateStoryLayerTemplate('Mod-Slab', 1, 'LT_Slab', 0, 6);

See Also:

GetNumStoryLayerTemplates   GetStoryLayerTemplateName   DeleteStoryLayerTemplate  



  DeleteStoryLayerTemplate Layers 

Declaration:

FUNCTION   DeleteStoryLayerTemplate
( index:INTEGER ) :BOOLEAN ;

Description:

Deletes the nth Story Layer Template from the current file. For example, if 3 is passed in, it will delete the 3rd Story Layer Template in the file.

Parameters:

index Index of the Story Layer Template to delete.

Result:

Whether a Story Layer Template with the indicated index existed in the file.

Example:

VAR

success:BOOLEAN;

BEGIN

success := DeleteStoryTemplate(3);

See Also:

GetNumStoryLayerTemplates   GetStoryLayerTemplateName   CreateStoryLayerTemplate  



  DisplayLayerScaleDialog Layers 

Declaration:

PROCEDURE   DisplayLayerScaleDialog
;

Description:

Brings up the Layer Scale dialog.



  FLayer Layers 

Declaration:

FUNCTION   FLayer
:HANDLE ;

Description:

Function FLayer returns a handle to the first layer in a Vectorworks document.




  GetLayer Layers 

Declaration:

FUNCTION   GetLayer
( h:HANDLE ) :HANDLE ;

Description:

Function GetLayer returns a handle to the layer of the referenced object.

Parameters:

h Handle to object.

Example:

LayerHandle:=GetLayer(ObjHd);



  GetLayerByName Layers 

Declaration:

FUNCTION   GetLayerByName
( layerName:STRING ) :HANDLE ;

Description:

Returns a handle to the specified layer.

Parameters:

layerName Name of layer.

Result:

Returns a HANDLE to the layer.



  GetLayerElevation Layers 

Declaration:

PROCEDURE   GetLayerElevation
(   h :HANDLE;
  VAR  baseElev :REAL;
  VAR  thickness :REAL
) ;

Description:

Gets the elevation and thickness of the specified layer.

Parameters:

h Handle to the layer
baseElev Base elevation of the layer
thickness Thickness of the layer

Example:

PROCEDURE Example;
VAR
	h :HANDLE; 
	baseElev, thickness :REAL;
BEGIN
	h := FLayer;
	WHILE h <> NIL DO BEGIN
		GetLayerElevation(h, baseElev, thickness);
		thickness := thickness / (25.4 / GetPrefReal(152));
		AlrtDialog(Concat('layer name: ', GetLName(h), ', baseElev: ', baseElev, ', thickness: ', thickness));
		h := NextLayer(h);
	END;
END;
RUN(Example);

See Also:

SetLayerElevation  



  GetLayerForStory Layers 

Declaration:

FUNCTION   GetLayerForStory
(   story :HANDLE;
    levelType :STRING
) :HANDLE ;

Description:

Gets the layer with the story and layer level type specified.

Parameters:

story The Story for which the will be looked up for level types.
levelType The level type of the story, which associated layer will be returned.

Result:

The Layer associated with the Story and layer level specified, which may be NULL.

Example:

VAR

layer:HANDLE;

BEGIN

layer:=GetLayerForStory(story);

See Also:

GetStoryOfLayer   GetNumStories   CreateStory   AssociateLayerWithStory  



  GetLayerLevelType Layers 

Declaration:

FUNCTION   GetLayerLevelType
( layer:HANDLE ) :STRING ;

Description:

Returns the Layer Level Type of the Layer.

Parameters:

layer The Layer whose Layer Level Type is desired.

Result:

The Layer Level Type of the Layer.

Example:

VAR

layerLevelType:STRING;

BEGIN

layerLevelType := GetLayerLevelType(ActLayer);

See Also:

SetLayerLevelType   CreateLayerLevelType  



  GetLayerOptions Layers 

Declaration:

FUNCTION   GetLayerOptions
:INTEGER ;

Description:

Returns layer visibility setting for the active document.

Visibility Index
Active Only 1
Gray Others 2
Gray/Snap Others 6
Show Others 3
Show/Snap Others 4
Show/Snap/Modify Others 5

Result:

Returns an INTEGER indicating the layer visibility status of the document.

See Also:

SetLayerOptions  



  GetLayerRenderMode Layers 

Declaration:

FUNCTION   GetLayerRenderMode
( theLayer:HANDLE ) :INTEGER ;

Description:

Returns the render mode for the referenced layer.

Table - Render Modes

Render Mode Constant
Wireframe 0
Unshaded Polygon 2
Shaded Polygon 3
Shaded Polygon No Lines 4
Final Shaded Polygon 5
Hidden Line 6
Dashed Hidden Line 7
OpenGL 11
Fast RenderWorks 12
Fast RenderWorks with Shadows 13
Final Quality Renderworks 14
Custom Renderworks 15



  GetLayerTransparency Layers 

Declaration:

FUNCTION   GetLayerTransparency
:REAL ;

Description:

Return the tranparency of the current layer.

See Also:

SetLayerTransparency  



  GetLevelTypeName Layers 

Declaration:

FUNCTION   GetLevelTypeName
( index:INTEGER ) :STRING ;

Description:

Returns the name of the nth Level Type in the file. For example, if 3 is passed in, it will return the name of the 3rd Level Type in the file.

Parameters:

index The index of the level type whose name is desired.

Result:

The name of the indicated level type.

Example:

VAR

levelTypeName:STRING;

BEGIN

levelTypeName:=GetLayerLevelTypeName(2);

See Also:

GetNumLayerLevelTypes   SetLevelTypeName  



  GetLName Layers 

Declaration:

FUNCTION   GetLName
( h:HANDLE ) :STRING ;

Description:

Function GetLName returns the name of the referenced layer.

Parameters:

h Handle to layer.



  GetLScale Layers 

Declaration:

FUNCTION   GetLScale
( h:HANDLE ) :REAL ;

Description:

Function GetLScale returns the scale of the referenced layer.

Parameters:

h Handle to layer.



  GetLVis Layers 

Declaration:

FUNCTION   GetLVis
( h:HANDLE ) :INTEGER ;

Description:

Function GetLVis returns the visibility of the referenced layer.

Table - Layer Visibility

Visibility Index Value
Normal 0
Grayed 2
Invisible -1

Parameters:

h Handle to layer.

Example:

FUNCTION GetLayerVisibility(layerHandle :handle) :INTEGER;
	{Returns the effective visibility of a layer.}
BEGIN
	GetLayerVisibility := -1;
	IF layerHandle = ActLayer THEN GetLayerVisibility := 0 ELSE {Active layers are always visible.}
	IF (GetObjectVariableInt(ActLayer, 154) = 1) & (GetObjectVariableInt(layerHandle, 154) = 1) THEN BEGIN
		{If it's not the active layer, then the only way that it can be visible is if
		the active layer is a design layer, and so is layerHandle, and the combination
		of layer options and the layer's visibility will result in a visible layer.}
		IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions = 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 2) THEN GetLayerVisibility := 2 ELSE
		IF (GetLayerOptions > 2) & (GetLVis(layerHandle) = 0) THEN GetLayerVisibility := 0;
	END;
END;


PROCEDURE Example;
BEGIN
	Message(GetLVis(GetLayerByName('Layer-1')));
END;
RUN(Example);



  GetNumLayerLevelTypes Layers 

Declaration:

FUNCTION   GetNumLayerLevelTypes
:INTEGER ;

Description:

Returns the number of layer level types in the file. A layer can be assigned a layer level type, which defines its location within a story.

Result:

The number of layer level types in the file.

See Also:

GetLayerLevelType   SetLayerLevelType   CreateLayerLevelType  



  GetNumStories Layers 

Declaration:

FUNCTION   GetNumStories
:INTEGER ;

Description:

Returns the number of stories in the file. Stories are used to group layers and are shown on the Story pane of the Organization dialog.

Result:

Returns the number of stories in the file.

See Also:

CreateStory   GetStoryOfLayer   AssociateLayerWithStory  



  GetNumStoryLayerTemplates Layers 

Declaration:

FUNCTION   GetNumStoryLayerTemplates
:INTEGER ;

Description:

Returns the number of story layer templates in the file. Story Layer Templates are used to define what Layers are typically found in a Story. When a Story is created, the user has the option to automatically create the Layers defined by the Story Layer Templates.

Result:

The number of Story Layer Templates in the file.

See Also:

CreateStoryLayerTemplate  



  GetSheetLayerUserOrigin Layers 

Declaration:

FUNCTION   GetSheetLayerUserOrigin
(   layerHandle :HANDLE;
  VAR  xOrigin :REAL;
  VAR  yOrigin :REAL
) :BOOLEAN ;

Description:

Gets the user origin of the specified sheet layer.

Parameters:

layerHandle Handle of the layer.
xOrigin X component of the sheet layer user origin.
yOrigin Y component of the sheet layer user origin.



  GetStoryAbove Layers 

Declaration:

FUNCTION   GetStoryAbove
( story:HANDLE ) :HANDLE ;

Description:

Returns the Story above the indicated Story. Returns NULL if there is none. If passed a NULL handle, returns the top-most Story in the current drawing.

Parameters:

story The indicated Story for which the Story above it is desired.

Result:

The Story above the indicated Story, or NULL if there is none. If a NULL handle is passed in, the topmost Story in the current drawing.

Example:

VAR

baseStory:HANDLE;
storyAbove:HANDLE;

BEGIN

baseStory := GetStoryOfLayer(ActLayer);
storyAbove := StoryAbove(baseStory);

See Also:

GetStoryBelow   GetNumStories   GetStoryOfLayer  



  GetStoryBelow Layers 

Declaration:

FUNCTION   GetStoryBelow
( story:HANDLE ) :HANDLE ;

Description:

Returns the Story below the indicated Story. Returns NULL if there is none. If passed a NULL handle, returns the bottom-most Story in the current drawing.

Parameters:

story The indicated Story for which the Story below it is desired

Result:

The Story below the indicated Story, or NULL if there is none. If a NULL handle is passed in, the bottom-most Story in the current drawing.

Example:

VAR

baseStory:HANDLE;
storyBelow:HANDLE;

BEGIN

baseStory := GetStoryOfLayer(ActLayer);
storyBelow := StoryBelow(baseStory);

See Also:

GetStoryAbove   GetNumStories   GetStoryOfLayer  



  GetStoryElevation Layers 

Declaration:

FUNCTION   GetStoryElevation
( story:HANDLE ) :REAL ;

Description:

Returns the elevaton of the indicated Story.

Parameters:

story The Story whose elevation is desired.

Result:

The elevation of the Story.

See Also:

CreateStory   SetStoryElevation  



  GetStoryLayerTemplateName Layers 

Declaration:

FUNCTION   GetStoryLayerTemplateName
( index:INTEGER ) :STRING ;

Description:

Returns the name of the nth Story Layer Template in the file. For example, if 3 is passed in, it will return the name of the 3rd Story Layer Template in the file.

Parameters:

index The index of the Story Layer Template whose name is desired.

Result:

The name of the nth Story Layer Template.

Example:

VAR

templateName:STRING;

BEGIN

templateName:=GetStoryLayerTemplateName(2);

See Also:

GetNumStoryLayerTemplates   CreateStoryLayerTemplate  



  GetStoryOfLayer Layers 

Declaration:

FUNCTION   GetStoryOfLayer
( layer:HANDLE ) :HANDLE ;

Description:

Returns the Story that the indicated Layer is associated with. Returns NULL if the Layer is not associated with a Story.

Parameters:

layer The Layer for which the associated Story is returned.

Result:

The Story associated with the Layer, which may be NULL.

Example:

VAR

story:HANDLE;

BEGIN

story:=GetStoryOfLayer(ActLayer);

See Also:

GetLayerForStory   GetNumStories   CreateStory   AssociateLayerWithStory  



  GetStorySuffix Layers 

Declaration:

FUNCTION   GetStorySuffix
( story:HANDLE ) :STRING ;

Description:

Returns the suffix of the indicated Story.

Parameters:

story The Story whose suffix is desired.

Result:

The suffix of the indicated Story.

See Also:

GetStoryElevation   SetStorySuffix  



  GetZVals Layers 

Declaration:

PROCEDURE   GetZVals
( VAR  zVal :REAL;
  VAR  deltaZVal :REAL
) ;

Description:

Procedure GetZVals returns the Z (layer base elevation) and delta Z (layer thickness) values for the active layer.

Parameters:

zVal Layer base elevation(above document ground plane).
deltaZVal Layer thickness.

Example:

PROCEDURE GetLayerHeights(layerHandle :handle; var baseElev, thickness :REAL);
BEGIN
	GetLayerElevation(layerHandle, baseElev, thickness);
	baseElev  := baseElev  / (25.4 / GetPrefReal(152));
	thickness := thickness / (25.4 / GetPrefReal(152));
END;



  GrayLayer Layers 

Declaration:

PROCEDURE   GrayLayer
;

Description:

Procedure GrayLayer sets the visibility status of the active layer to grayed. Objects on grayed layers will always appear grayed when viewed from other layers.


Example:

Layer('Future Construction');
GrayLayer;
{grays the layer 'Future Construction'}



  HGetLayerTransp Layers 

Declaration:

FUNCTION   HGetLayerTransp
( hLayer:HANDLE ) :REAL ;

Description:

Get the transparency of the spcified layer.

Parameters:

hLayer Handle to the layer.

See Also:

HSetLayerTransp   GetLayerTransparency  



  HideLayer Layers 

Declaration:

PROCEDURE   HideLayer
;

Description:

Procedure HideLayer sets the visibility status of the active layer to hidden. Objects on hidden layers will not be viewable from other layers.

Example:

Layer('Future Construction');
HideLayer;
{hides the layer 'Future Construction'}



  HSetLayerTransp Layers 

Declaration:

PROCEDURE   HSetLayerTransp
(   hLayer :HANDLE;
    transparency :REAL
) ;

Description:

Set the transparency of the specified layer.

Parameters:

hLayer Handle to the layer.
transparency The transparency for the layer. Value between 0.0 and 100.0

See Also:

SetLayerTransparency   HGetLayerTransp  



  IsLayerReferenced Layers 

Declaration:

FUNCTION   IsLayerReferenced
(   layer :HANDLE;
  VAR  pathname :STRING
) :BOOLEAN ;

Description:

Returns whether a layer is workgroup referenced, and if so, the path to the source document is returned.

Parameters:

layer Handle to the layer
pathname On return, a string containing the path to the source document

Result:

Returns true if the layer is referenced, false otherwise.



  Layer Layers 

Declaration:

PROCEDURE   Layer
( name:STRING ) ;

Description:

Procedure Layer creates a new layer in a Vectorworks document. After creation, the new layer becomes the active layer of the document.

Layer can also be used to switch the active layer of the document. If the layer name passed to the procedure already exists, the procedure switches the active layer to the specified layer.

Single quotes should be avoided in layer names, as they will be treated as a mismatched string specifier, and will cause an error to be generated.

Parameters:

name Name of new or existing layer.

Example:

Layer('Ductwork-1st Floor');
{creates a new layer named 'Ductwork-1st Floor'}

Layer(newLayerName);
{creates a new layer whose name is specified in the variable}

Layer('Untitled-1');
{switches to the existing layer 'Untitled-1'}



  LayerRef Layers 

Declaration:

PROCEDURE   LayerRef
( layerName:STRING ) ;

Description:

Procedure LayerRef places a layer reference (layer link) into the active layer at location (0,0).

Parameters:

layerName Name of referenced layer.

Example:

LayerRef('Layer-2');
{creates a layer link of 'Layer-2' on the active layer}



  LFillBack Layers 

Declaration:

PROCEDURE   LFillBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure LFillBack sets the background fill color for the active layer. RGB values are in the range of 0~65535.

Parameters:

color RGB color component value.

Example:

LFillBack(65535,0,39321);



  LFillFore Layers 

Declaration:

PROCEDURE   LFillFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure LFillFore sets the foreground fill color for the active layer. RGB values are in the range of 0~65535.

Parameters:

color RGB color component value.

Example:

LFillFore(65535,0,39321);



  LLayer Layers 

Declaration:

FUNCTION   LLayer
:HANDLE ;

Description:

Function LLayer returns a handle to the last layer in a Vectorworks document.




  LPenBack Layers 

Declaration:

PROCEDURE   LPenBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure LPenBack sets the background pen color for the active layer. RGB values are in the range of 0~65535.

Parameters:

color RGB color component value.



  LPenFore Layers 

Declaration:

PROCEDURE   LPenFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure LPenFore sets the foreground pen color for the active layer. RGB values are in the range of 0~65535.

Parameters:

color RGB color component value.



  NumLayers Layers 

Declaration:

FUNCTION   NumLayers
:INTEGER ;

Description:

Function NumLayers returns the current number of layers within the active document.




  NumObj Layers 

Declaration:

FUNCTION   NumObj
( h:HANDLE ) :LONGINT ;

Description:

Function NumObj returns the number of objects on the referenced layer.

Parameters:

h Handle to layer.



  SetDefStoryLayerName Layers 

Declaration:

FUNCTION   SetDefStoryLayerName
(   index :INTEGER;
    name :STRING
) :BOOLEAN ;

Description:

Sets the name of the nth Default Story Layer in the file. For example, if 3 is passed in, it will set the name of the 3rd Default Story Layer in the file.

Parameters:

index The index of the default story layer whose name should be set.
name The name that the indicated default story layer should be set to.

Result:

Whether the setting of the name of the default story layer succeeded. It will fail if passed an invalid index. The name must not have more than 63 characters and must not be used by another default story layer in the file.

Example:

VAR

result : BOOLEAN;

BEGIN

result := SetStoryLayerTemplateName(2, "Subfloor");

See Also:

GetNumStoryLayerTemplates   GetStoryLayerTemplateName  



  SetLayerElevation Layers 

Declaration:

PROCEDURE   SetLayerElevation
(   h :HANDLE;
    baseElev :REAL;
    thickness :REAL
) ;

Description:

Sets the elevation and thickness of the specified layer.

Parameters:

h Handle to the layer
baseElev Base elevation of the layer
thickness Thickness of the layer

See Also:

GetLayerElevation  



  SetLayerLevelType Layers 

Declaration:

FUNCTION   SetLayerLevelType
(   layer :HANDLE;
    layerLevelType :STRING
) :BOOLEAN ;

Description:

Sets the Layer Level Type of a Layer. If the type passed in does not exist or if it already used by another Layer on the same Story, then the operation will fail.

Parameters:

layer The Layer for which the Layer Level Type is being set.
layerLevelType The Layer Level Type.

Result:

Whether the attempt to set the Layer Level Type was successful.

Example:

SetLayerLevelType(ActLayer, 'LT_SLAB');

See Also:

GetLayerLevelType   CreateLayerLevelType  



  SetLayerOptions Layers 

Declaration:

PROCEDURE   SetLayerOptions
( layerOpts:INTEGER ) ;

Description:

Sets layer visibility setting for the active document.

Visibility Index
Active Only 1
Gray Others 2
Gray/Snap Others 6
Show Others 3
Show/Snap Others 4
Show/Snap/Modify Others 5

Parameters:

layerOpts New layer visibility setting for document.

See Also:

GetLayerOptions  



  SetLayerRenderMode Layers 

Declaration:

PROCEDURE   SetLayerRenderMode
(   theLayer :HANDLE;
    newRenderMode :INTEGER;
    immediate :BOOLEAN;
    doProgress :BOOLEAN
) ;

Description:

Sets the render mode of the referenced layer.

Parameters:

theLayer Handle of the layer
newRenderMode New render mode to set
immediate If true, then all rendering will take place before the call returns. Otherwise, any rendering that can take place in the background will be postponed until program execution re-enters the main event loop
doProgress controls whether progress information is displayed during the operation



  SetLayerTransparency Layers 

Declaration:

PROCEDURE   SetLayerTransparency
( transparency:REAL ) ;

Description:

Procedure SetLayerTransparency assigns a transparency percentage value to the active design layer. If a sheet layer is active, the procedure has no effect. The transparency value must be between 0.0 and 100.0, inclusive.

The design layer will only be imaged with transparency on systems which support it, like Quartz on the Mac. Setting the transparency to a value greater than 0, when the current transfer mode is Copy (i.e. 8, Paint mode), will also automatically change the layer transfer mode to OR (i.e. 9, Overlay). Similarly, setting the transparency to 0, when the current transfer mode is not set to Copy, will also automatically change the layer transfer mode to Copy. This is to approximately preserve the appearance of the drawing when imaging on systems that don't support transparency, like Windows.

See Also:

CopyMode  



  SetLevelTypeName Layers 

Declaration:

FUNCTION   SetLevelTypeName
(   index :INTEGER;
    name :STRING
) :BOOLEAN ;

Description:

Sets the name of the nth Level Type in the file. For example, if 3 is passed in, it will set the name of the 3rd Level Type in the file.

Parameters:

index The index of the level type whose name is being set.
name The name the indicated level type should be set to.

Result:

Whether the setting of the name of the level type succeeded. It will fail if passed an invalid index. The name must not have more than 63 characters and must not be used by another level type in the file.

Example:

VAR

result : BOOLEAN;

BEGIN

result := SetLayerLevelTypeName(2, "Subfloor");

See Also:

GetNumLayerLevelTypes   GetLevelTypeName  



  SetLScale Layers 

Declaration:

PROCEDURE   SetLScale
(   h :HANDLE;
    scale :REAL
) ;

Description:

Procedure SetLScale sets the scale of the referenced layer.

Calculating the Scale

To calculate the scale parameter from an architecural scale, the following formula may be used :

denominator/numerator * true size(in inches) = ActualSize

For example, to calculate a scale of 3/8"=1'-0", the scale parameter would be 8/3 *12 = 32.

Parameters:

h Handle to layer.
scale Scale value for layer.

Example:

SetLScale(HandleToLayer,96);
{sets the referenced layer to a scale of 1/8" = 1'}



  SetScale Layers 

Declaration:

PROCEDURE   SetScale
( actualSize:REAL ) ;

Description:

Procedure SetScale sets the drawing scale of the active layer of the document.

Calculating the Scale

To calculate the scale parameter from an architecural scale, the following formula may be used :

denominator/numerator * true size(in inches) = ActualSize

For example, to calculate a scale of 3/8"=1'-0", the scale parameter would be 8/3 *12 = 32.

Parameters:

actualSize Drawing scale factor.



  SetSheetLayerUserOrigin Layers 

Declaration:

FUNCTION   SetSheetLayerUserOrigin
(   layerHandle :HANDLE;
    xOrigin :REAL;
    yOrigin :REAL
) :BOOLEAN ;

Description:

Sets the user origin of the specified sheet layer.



  SetStoryElevation Layers 

Declaration:

FUNCTION   SetStoryElevation
(   story :HANDLE;
    elevation :REAL
) :BOOLEAN ;

Description:

Sets the elevation of the indicated Story. Returns whether the elevation was successfully set. If the elevaton change would cause Layers associated with the Story to overlap Layers associated with another Story, then the change in elevation will be prevented.

Parameters:

story The Story whose elevation is to be set.
elevation The elevation to set the Story to.

Result:

Whether the elevation is successfully changed.

See Also:

CreateStory   GetStoryElevation  



  SetStorySuffix Layers 

Declaration:

FUNCTION   SetStorySuffix
(   story :HANDLE;
    suffix :STRING
) :BOOLEAN ;

Description:

Sets the suffix of the indicated Story. Returns whether the suffix was successfully set. If the suffix is already used by another Story, then the change in suffix will be prevented.

Parameters:

story The story whose suffix is being set.
suffix The new value of the suffix of the indicated Story.

Result:

Whether the suffix is successfully changed.

See Also:

GetStorySuffix   SetStoryElevation  



  SetZVals Layers 

Declaration:

PROCEDURE   SetZVals
(   zDistance :REAL;
    deltaZDistance :REAL
) ;

Description:

Procedure SetZVals sets the Z (layer base elevation) and delta Z (layer thickness) for the active layer.

Parameters:

zDistance Layer base elevation (above document ground plane).
deltaZDistance Layer thickness.

Example:

PROCEDURE Example;
VAR
   baseElevation, thickness :REAL;
BEGIN
   Layer('Test Layer');
   baseElevation := 1;
   thickness := 3;
   SetZVals(baseElevation, thickness);
END;
RUN(Example);



  ShowLayer Layers 

Declaration:

PROCEDURE   ShowLayer
;

Description:

Procedure ShowLayer sets the visibility status of the active layer to visible. Newly created layers always defaulted to the Show mode.

Example:

Layer('Future Construction');
ShowLayer;